﻿#if UNITY_EDITOR
using NPOI.SS.UserModel;
/// <summary>
/// xlsx表架构扩展
/// </summary>
public static class ESF_Xml_XlsxTableSchema_Extend
{
    /// <summary>
    /// Xlsx表Sheet索引
    /// </summary>
    /// <param name="_schema">架构</param>
    /// <returns>Xlsx表Sheet索引</returns>
    public static int xlsxSheetIndex(this ESF_Xml_XlsxTableSchema _schema)
    {
        return 0;
    }

    /// <summary>
    /// CS名称Xlsx表行索引
    /// </summary>
    /// <param name="_sheet">Sheet表</param>
    /// <returns></returns>
    public static int csName_RowIndex(this ISheet _sheet)
    {
        return 0;
    }

    /// <summary>
    /// CS类型Xlsx表行索引
    /// </summary>
    /// <param name="_sheet">Sheet表</param>
    /// <returns></returns>
    public static int csDataType_RowIndex(this ISheet _sheet)
    {
        return 1;
    }

    /// <summary>
    /// SQL名称Xlsx表行索引
    /// </summary>
    /// <param name="_sheet">Sheet表</param>
    /// <returns></returns>
    public static int sqlName_RowIndex(this ISheet _sheet)
    {
        return 2;
    }

    /// <summary>
    /// 说明Xlsx表行索引
    /// </summary>
    /// <param name="_sheet">Sheet表</param>
    /// <returns></returns>
    public static int desc_RowIndex(this ISheet _sheet)
    {
        return 3;
    }

    /// <summary>
    /// 起始数据Xlsx表行索引
    /// </summary>
    /// <param name="_sheet">Sheet表</param>
    /// <returns></returns>
    public static int startValue_RowIndex(this ISheet _sheet)
    {
        return 4;
    }

    /// <summary>
    /// 行列式表CS名称Xlsx列序号
    /// </summary>
    /// <param name="_row">行</param>
    /// <returns></returns>
    public static int csName_Det_CellOrdinal(this IRow _row)
    {
        return 0;
    }

    /// <summary>
    /// 行列式表CS值Xlsx列序号
    /// </summary>
    /// <param name="_row">行</param>
    /// <returns></returns>
    public static int csValue_Det_CellOrdinal(this IRow _row)
    {
        return 1;
    }

    /// <summary>
    /// 行列式表CS类型Xlsx列序号
    /// </summary>
    /// <param name="_row">行</param>
    /// <returns></returns>
    public static int csDataType_Det_CellOrdinal(this IRow _row)
    {
        return 2;
    }

    /// <summary>
    /// 行列式表说明Xlsx列序号
    /// </summary>
    /// <param name="_row">行</param>
    /// <returns></returns>
    public static int desc_Det_CellOrdinal(this IRow _row)
    {
        return 3;
    }

    /// <summary>
    /// Xlsx表行序号
    /// </summary>
    /// <param name="_row">行</param>
    /// <returns>行序号</returns>
    public static int xlsxSerialNumber(this IRow _row)
    {
        return _row.RowNum + 1;
    }

    /// <summary>
    /// Xlsx表列序号
    /// </summary>
    /// <param name="_cell">列</param>
    /// <returns>列序号</returns>
    public static int xlsxSerialNumber(this ICell _cell)
    {
        return _cell.ColumnIndex;
    }
}
#endif

